package com.lld.im.service.callback;

import com.lld.im.common.ResponseVO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.messaging.handler.annotation.Header;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@Slf4j
public class CallBackController {

    /**
     * 处理消息回调
     *
     * @return
     */
    @RequestMapping("/callback")
    public ResponseVO callbackHandler(@RequestBody String body,
                                      @Header(value = "appId") String appId,
                                      @Header("callBackCommand") String callBackCommand ){
        log.info("收到消息回调... msg=={},appId={},command=={}",body,appId,callBackCommand);
        return ResponseVO.successResponse();
    }
}
